import request from '@/utils/request'

/** 查询列表 */
export function listSysPermission(params) {
  return request({
    url: '/system/sysPermission/list',
    method: 'get',
    params: params
  })
}

/** 导出 */
export function exportSysPermission(params) {
  return request({
    url: '/system/sysPermission/exportExcel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}

/** 根据主键查询 */
export function getSysPermission(id) {
  return request({
    url: '/system/sysPermission/queryById/' + id,
    method: 'get'
  })
}

/** 新增 */
export function saveSysPermission(data) {
  return request({
    url: '/system/sysPermission/save',
    method: 'post',
    data
  })
}

/** 根据主键更新 */
export function updateSysPermission(data) {
  return request({
    url: '/system/sysPermission/updateById',
    method: 'post',
    data
  })
}

/** 根据主键删除 */
export function removeSysPermission(id) {
  return request({
    url: '/system/sysPermission/removeById/' + id,
    method: 'get'
  })
}

/** 根据主键批量删除 */
export function removeBatchSysPermission(ids) {
  return request({
    url: '/system/sysPermission/removeBatchByIds/' + ids,
    method: 'get'
  })
}
